<?php

namespace App\Http\Livewire\Files;

use Livewire\Component;
use Livewire\WithFileUploads;

class Upload extends Component
{
    use WithFileUploads;
    public $picture;

    public function save()
    {
        $this->validate([
            'picture' => 'image', // 1MB Max
        ]);

        $this->picture->store('photos');
        return;
    }

    public function render()
    {
        return view('livewire.files.upload');
    }
}
